this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint));
this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
- this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
+ this.actor.connect('key-press-event', Lang.bind(this, this.onKeyPressEvent));
this._releaseId = this._motionId = 0;
this._dragging = false;
return true;
},
- _onKeyPressEvent: function (actor, event) {
+ onKeyPressEvent: function (actor, event) {
let key = event.get_key_symbol();
if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._item.actor.connect('button-press-event', Lang.bind(this, function(actor, event) {
this._slider.startDragging(event);
}));
+ this._item.actor.connect('key-press-event', Lang.bind(this, function(actor, event) {
+ return this._slider.onKeyPressEvent(actor, event);
+ }));
+
},
_sliderChanged: function(slider, value) {
this.item.actor.connect('button-press-event', Lang.bind(this, function(actor, event) {
this._slider.startDragging(event);
}));
+ this.item.actor.connect('key-press-event', Lang.bind(this, function(actor, event) {
+ return this._slider.onKeyPressEvent(actor, event);
+ }));
this._stream = null;
},